package com.huakang.entity;

import java.io.Serializable;

/**
 * prescription
 * @author 
 */
public class Prescription implements Serializable {
    /**
     * 处方编号
     */
    private Integer prid;

    /**
     * 就诊id
     */
    private Integer sid;

    /**
     * 药品id
     */
    private Integer medid;

    /**
     * 开药数量
     */
    private String mednum;

    /**
     * 使用规则
     */
    private String description;

    private static final long serialVersionUID = 1L;


    public Integer getPrid() {
        return prid;
    }

    public void setPrid(Integer prid) {
        this.prid = prid;
    }

    public Integer getSid() {
        return sid;
    }

    public void setSid(Integer sid) {
        this.sid = sid;
    }

    public Integer getMedid() {
        return medid;
    }

    public void setMedid(Integer medid) {
        this.medid = medid;
    }

    public String getMednum() {
        return mednum;
    }

    public void setMednum(String mednum) {
        this.mednum = mednum;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Prescription other = (Prescription) that;
        return (this.getPrid() == null ? other.getPrid() == null : this.getPrid().equals(other.getPrid()))
            && (this.getSid() == null ? other.getSid() == null : this.getSid().equals(other.getSid()))
            && (this.getMedid() == null ? other.getMedid() == null : this.getMedid().equals(other.getMedid()))
            && (this.getMednum() == null ? other.getMednum() == null : this.getMednum().equals(other.getMednum()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPrid() == null) ? 0 : getPrid().hashCode());
        result = prime * result + ((getSid() == null) ? 0 : getSid().hashCode());
        result = prime * result + ((getMedid() == null) ? 0 : getMedid().hashCode());
        result = prime * result + ((getMednum() == null) ? 0 : getMednum().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", prid=").append(prid);
        sb.append(", sid=").append(sid);
        sb.append(", medid=").append(medid);
        sb.append(", mednum=").append(mednum);
        sb.append(", description=").append(description);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }


}